-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
move tunnel_map
to MPPTunnelSet
#5123
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Signed-off-by: xufei <[email protected]>
Signed-off-by: xufei <[email protected]>
97923c9
to
d4ed888
Compare
dbms/src/Flash/Mpp/MPPTunnelSet.h
Outdated
|
||
uint16_t getPartitionNum() const { return tunnels.size(); } | ||
|
||
void addTunnel(const TunnelPtr & tunnel) | ||
void registerTunnel(const MPPTaskId & id, const TunnelPtr & tunnel) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about hide the implementation in .cpp file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
catch (...) | ||
{ | ||
tryLogCurrentException(log, "Failed to write error " + msg + " to tunnel: " + tunnel->id()); | ||
tunnel->close("Failed to write error msg to tunnel"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in original code, tunnel->close
is the 1st statement, are they same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep the original implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: xufei <[email protected]>
Signed-off-by: xufei <[email protected]>
@@ -71,6 +72,8 @@ class MPPTunnelSetBase : private boost::noncopyable | |||
|
|||
private: | |||
std::vector<TunnelPtr> tunnels; | |||
std::unordered_map<MPPTaskId, size_t> id_to_index_map; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::unordered_map<MPPTaskId, size_t> id_to_index_map; | |
std::unordered_map<MPPTaskId, size_t> target_id_to_index_map; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, but the pr was already merged :(
/merge |
@windtalker: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger If you have any questions about the PR merge process, please refer to pr process. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
This pull request has been accepted and is ready to merge. Commit hash: 873e982
|
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
Signed-off-by: xufei [email protected]
What problem does this PR solve?
Issue Number: ref #5095
Problem Summary:
Currently, there 2 tunnel related components in
MPPTask
This pr move
tunnel_map
to MPPTunnelSet, and all the tunnel releated operate are handled inMPPTunnelSet
What is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note